// 主页js
import request from '@/utils/request'

// 砍树
export function chopTrees(num) {
	return request({
		url: "/material/chopTrees/"+num,
		method: 'post',
	})
}
// 获取装备
export function getEquip(obj) {
	return request({
		url: "/material/getEquip",
		method: 'get',
	})
}

// 查看菜市场
export function lookDish(data) {
	return request({
		url: "/material/lookDish/" + data.lookMemberId,
		method: 'post',
	})
}


// 天团成员树的列表
export function getMyGuildHaveTreeList(obj) {
	return request({
		url: '/material/getMyGuildHaveTreeList/' +
			obj.page + '/' + obj.size,
		method: 'get',
	})
}

//兑换
// 获取黑市列表
export function exchangeDish(exChangFruitDto) {
	return request({
		url: '/material/exchange',
		method: 'post',
		data: exChangFruitDto, // 将 dto 对象作为参数传递给接口
	})

}

// 访客记录
export function getaccessRecord(obj) {
	return request({
		url: '/material/accessRecord/' + obj.page + '/' + obj.size,
		method: 'get',
	})
}

// 道具兑换
export function getExchangeRatio(obj) {
	return request({
		url: '/material/exchangeRatio?num=' + obj.num + '&fruitName=' + obj.fruitName,
		method: 'get',
	})
}


// 获取斧头数量
export function getChopTreesTicket(obj) {
	return request({
		url: '/material/getChopTreesTicket',
		method: 'get',
	})
}